
import os
import unittest
from BeautifulReport import BeautifulReport

from tools.handle_path import report_dir,report_name
from unittestreport import TestRunner

 # BeautifulReport 生成测试报告
# dir_path = os.path.dirname(__file__)
# suite = unittest.defaultTestLoader.discover(start_dir=dir_path,pattern='test_cases.py')
#
# br = BeautifulReport(suites=suite)
#
# br.report(description='test',report_dir=report_dir,filename=report_name)



#unittestreport 生成测试报告
# dir_path = os.path.dirname(__file__)
#
# suite = unittest.defaultTestLoader.discover(start_dir=dir_path,pattern='case_ddt.py')
# runner = TestRunner(
#                  suite=suite,
#                  filename="py39_report_88.html",
#                  title='py39',
#                  tester='ray',
#                  desc="py39项目报告",
#                  templates=1
# )
# runner.run()

#使用allure生成报告
import pytest

pytest.main(["-s", "-v","--alluredir=allure_files"])